1. Field of the Invention
The present invention relates to a semiconductor device including a watch dog timer (runaway monitoring means).
2. Description of the Prior Art
A description will be made hereinbelow in terms of a one-chip microcomputer which is one of such conventional semiconductor devices. FIG. 6 is a block diagram showing a schematic arrangement of the one-chip microcomputer including a conventional watch dog timer. In the illustration, numeral 1 represents the one-chip microcomputer, 2 designates a CPU (central processing unit), and 3 depicts a watch dog timer comprising a preset overflow counter which is arranged so as to generate an overflow signal to the CPU 2 when being not initialized by the CPU 2 for a predetermined time. Further, numeral 4 is an input/output port of the one-chip microcomputer 1 which is coupled through an internal bus (not shown) to the CPU 2, 5 represents a reset signal to be outputted at a predetermined time interval from the CPU 2 to the watch dog timer 3, 6 designates an overflow signal to be outputted from the watch dog timer 3 to the CPU 2, and 7 depicts a control signal whereby the CPU 2 controls the input/output port 4. Still further, numeral 8 is an external system such as an engine controller which is coupled to the input/output port 4 so as to be controlled by the CPU 2 of the one-chip microcomputer 1.
Secondly, a description will be made hereinbelow in terms of the operation. The watch dog timer 3 is for monitoring the runaway of the CPU 2 and arranged so as to generate the overflow signal 6 to the CPU 2 in the case that the CPU 2 encounters difficulty to output the periodic reset signal 5 due to the runaway resulting from the disturbance such as noises so that the CPU 2 does not initialize the watch dog timer irrespective of elapse of a predetermined time period. The CPU 2 receives as a non-maskable interrupt signal the overflow signal 6 therefrom, thereby returning from the runaway. In this case, in order to avoid the adversely influence to the external system 8, the one-chip microcomputer 1 itself can be required to be separated therefrom. Thus, the CPU 2 outputs the control signal 7 to the input/output port 4 in the interrupt process so as to be separated from the external system 8.
There is a problem which arises with such a conventional device, however, in that, for separating the one-chip microcomputer from the external system at the time of the runaway of the CPU, the separation process is arranged to be performed in the CPU interrupt process, and therefore the software overhead essentially occurs so as to make it difficult to separate the CPU from the external system at the real time in response to the occurrence of the runaway.